package com.qian.fmall.commons;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultSet implements Serializable {
    private String msg;
    private Object data;
    private Integer code;
    public static ResultSet ok(String msg){
        return new ResultSet(msg,null,200);
    }
    public static ResultSet ok(String msg,Object  data){
        return new ResultSet(msg,data,200);
    }
    public static ResultSet error(String msg){
        return new ResultSet(msg,null,400);
    }

}
